home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk19
/
blinker
/
scanmodule.sub
< prev
Wrap
Text File
|
1995-03-18
|
1KB
|
54 lines
'---------------------------------------------------------------------------
'
' Scan Module
'
'
' Copyright 1987 by Brian Zupke
'
'
'
' Scans module using Library.Pathname for calls to object
' modules in the user library (those having the '.sub' extension).
' Names of modules found are placed in Modules.Called list. If
' the module scan fails, then Module.Scanned is returned FALSE.
' Each line read is also place in destination file to create
' the executeable program.
'
'
SUB ScanModule.SUB(ModuleName$,ModulesCalled$(1),Called,ModuleScanned) STATIC
SHARED LibraryPathname$,Compress
'
Called = 0
PRINT "Scanning module ";ModuleName$
'
OPEN LibraryPathname$+ModuleName$ FOR INPUT AS #1 LEN = 4096
'
' Scan each line for module call.
'
IF NoError THEN
WHILE NoError AND (NOT EOF(1))
LINE INPUT#1,SourceLine$
'
' Add line to output file.
'
CALL CommentCheck.SUB(SourceLine$,LineIsComment)
IF NOT (LineIsComment AND Compress) THEN
PRINT #2,SourceLine$
END IF
IF NOT LineIsComment THEN
CALL ScanLine.SUB(SourceLine$,ModuleCall$)
IF ModuleCall$ <> "" THEN
Called = Called + 1
ModulesCalled$(Called) = ModuleCall$
END IF
END IF
WEND
END IF
IF NoError THEN
ModuleScanned = TRUE
ELSE
ModuleScanned = FALSE
END IF
CLOSE #1
END SUB